package org.demo.vo.daomapping;

import org.demo.vo.bean.Badge;
import org.telosys.persistence.mapping.AttributeMapping;
import org.telosys.persistence.mapping.DateType;
import org.telosys.persistence.mapping.EntityMapping;

public class BadgeMapping extends EntityMapping<Badge>
{
	private final static Class<Badge> entityClass = Badge.class ;

	private final static String   table   = "BADGE" ;

	private final static String   schema  = null ;  // Can be null if not required by the database
	
	private final static AttributeMapping[] attributesMapping = new AttributeMapping[]
	{
		new AttributeMapping("badgeNumber",        "BADGE_NUMBER",        true,  false, 0  ), // int PK
		new AttributeMapping("authorizationLevel", "AUTHORIZATION_LEVEL", false, false, 0 ), // short
		new AttributeMapping("endOfValidity",      "END_OF_VALIDITY",     false, false, 0, DateType.dateOnly )  // java.util.Date ( Date only )
	};
	
	public BadgeMapping() 
	{
		super(entityClass, table, schema, attributesMapping, null, null );
	}

}
